#ifndef FOLLOWSMALLENEMY_H
#define FOLLOWSMALLENEMY_H

#include <QFileInfo>
#include <QGraphicsItem>
#include <QGraphicsScene>
#include <QMap>
#include <QPainter>
#include <QList>
#include <QPointF>
#include <QPixmap>
#include <QRectF>
#include <QDebug>


class FollowSmallEnemy:public QGraphicsItem
{
public:
    FollowSmallEnemy(QGraphicsScene *m_scene);
    virtual QRectF boundingRect() const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
    void setRotation(float angle);
    void setPos(const QPointF &pos);
    void setVisible(bool visible);
    bool isVisible();
    void advance(int phase);
    void setBlood(float damage);

    QString root;
    QGraphicsScene *scene;
    QPixmap *blood_gb;
    QPixmap *blood_front;
    QList<QPixmap> pix;//用来存储敌人动画

    float current_blood_front_x = 49.0f;
    float current_blood = 1000.0f;
    float blood_front_x;
    int isshowblood;
    float speed;
    float blood;

    float Rotate;//用来设置角度

    int state;
    int stopTime;//进行延迟


};



#endif // FOLLOWSMALLENEMY_H
